<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="admin/_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <!--移动端更好的适应-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../../static/dist/semantic/semantic.min.css">
    <link rel="stylesheet" href="../../static/css/my.css">
    <title>标签管理</title>
</head>
<body>
    <!--导航开始--------------------------------------------->
    <nav th:replace="admin/_fragments :: menu(3)" class="ui inverted attached segment m-padded-mini m-shadow-small" >
        <div class="ui container">
            <div class="ui inverted secondary stackable menu">
                <h2 class="ui teal header item">管理后台</h2>
                <a href="#" class="active m-item item m-mobile-hide"><i class="home icon"></i>博客</a>
                <a href="#" class="m-item item m-mobile-hide"><i class="idea icon"></i>分类</a>
                <a href="#" class="m-item item m-mobile-hide"><i class="tags icon"></i>标签</a>
                <div class="right m-item m-mobile-hide menu">
                    <div class="ui dropdown item">
                        <img class="ui avatar image" src="../../static/images/me.jpg">XX
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <a href="#" class="item">修改密码</a>
                            <a href="#" class="item">个人信息</a>
                            <a href="#" class="item">注销</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <a href="#" class="ui m-menu m-toggle black icon button m-right-top m-mobile-show">
            <i class="sidebar icon"></i>
        </a>
    </nav>
    <!-- 二级导航 -->
    <div class="ui attached pointing menu">
        <div class="ui container">
            <div class="right menu">
                <a th:href="@{/admin/tags/input}" href="#" class="item">发布</a>
                <a th:href="@{/admin/tags}" href="#" class="active teal item">列表</a>
            </div>
        </div>
    </div>
    <!--导航结束---------------------------------------------->


    <!--中间内容开始------------------------------------------>
    <div class="m-container-small m-padded-large">
        <div class="ui container">
            <div class="ui success message" th:unless="${#strings.isEmpty(message)}">
                <i class="close icon"></i>
                <div class="header">提示：</div>
                <p th:text="${message}">恭喜，操作成功！</p>
            </div>

            <!-- 中间内容搜索结果开始 -->
            <table class="ui celled table">
                <thead>
                    <tr>
                        <th></th>
                        <th>名称</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr  th:each="tag,iterStat :${page.list}">
                        <td th:text="${iterStat.count}">1</td>
                        <td th:text="${tag.name}">springboot开发指南</td>
                        <td>
                            <a th:href="@{/admin/tags/{id}/input(id=${tag.getId()})}" href="#" class="ui mini teal basic button">编辑</a>
                            <a th:href="@{/admin/tags/{id}/delete(id=${tag.getId()})}" href="#" class="ui mini red basic button">删除</a>
                        </td>
                    </tr>
                </tbody>
                <!-- 中间内容分页开始 -->
                <tfoot>
                    <tr>
                        <th colspan="6">
                            <div class="ui mini pagination menu"  th:if="${page.getPages()>1}">
                                <div class="item"><a th:href="@{/admin/tags(pageNum=${page.hasPreviousPage}?${page.prePage}:1)}">上一页</a></div>
                                <div class="item"><a th:href="@{/admin/tags(pageNum=${page.hasNextPage}?${page.nextPage}:${page.pages})}">下一页</a></div>
                            </div>
                            <a th:href="@{/admin/tags/input}" class="ui mini right floated teal basic button">新增</a>
                        </th>
                    </tr>
                </tfoot>
                <!-- 中间内容分页结束 -->
            </table>
            <!-- 中间内容搜索结果结束 -->
            <br>
            <br>
            <br>
            <br>

        </div>
    </div>
    <!--中间内容结束------------------------------------------>
    <br>
    <br>
    <br>
    <br>
    <br>
    <!--底部内容开始-->
    <footer th:replace="admin/_fragments :: footer" class="ui inverted vertical segment m-padded-massive">
        <div class="ui center aligned container">
            <div class="ui inverted divided stackable grid">
                <div class="three wide column">
                    <div class="ui inverted link list">
                        <div class="item">
                            <img src="../../static/images/wechat.png" class="ui rounded image" alt="" style="width: 110px"/>
                        </div>

                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">最新博客</h4>
                    <div class="ui inverted link list">
                        <a class="item" href="#">testXXXXXXXXX</a>
                        <a class="item" href="#">testXXXXXXXXX</a>
                        <a class="item" href="#">testXXXXXXXXX</a>
                        <a class="item" href="#">testXXXXXXXXX</a>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">联系我</h4>
                    <div class="ui inverted link list">
                        <a class="item" href="#">Email: XXXX@qq.com</a>
                        <a class="item" href="#">QQ: XXXX</a>
                    </div>
                </div>
                <div class="seven wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">介绍</h4>
                    <p class="m-text-thin m-text-spaced m-opacity-mini">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                        XXXXXXXXXXXXXXXXXXXXXXXXXXXX</p>
                </div>

            </div>
            <div class="ui inverted section divider"></div>
            <p class="m-text-thin m-text-spaced m-opacity-tiny">Copyright 2020 - 2021 雪融</p>
        </div>
    </footer>
    <!--底部内容结束------------------------------------------>

    <!--/*/<th:block th:replace="_fragments :: script">/*/-->
        <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
        <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
        <script src="../../static/lib/editormd/editormd.min.js" th:src="@{/lib/editormd/editormd.min.js}"></script>
    <!--/*/</th:block>/*/-->
<script>
    $('.m-menu.m-toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });

    $('.ui.dropdown').dropdown({
        on : 'hover'
    });

    //消息提示关闭初始化
    $('.message .close')
        .on('click', function () {
            $(this)
                .closest('.message')
                .transition('fade');
        });
</script>
</body>
</html>